﻿using Cpjit.SunnyPaine.Toolkit.RabbitMQ;
using Cpjit.SunnyPaine.Toolkit.RabbitMQ.Enums;
using Cpjit.SunnyPaine.Toolkit.RabbitMQ.Impl;
using Cpjit.SunnyPaine.Toolkit.RabbitMQ.Model;
using Cpjit.SunnyPaine.Toolkit.Test.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cpjit.SunnyPaine.Toolkit.Test.Consumer.Rabbitmq
{
    public class Test1Comsumer : AbstractConsumer
    {
        public Test1Comsumer()
        {
            base.Mode = WorkMode.Fanout;
            base.ExchangeName = "exchange_test";
            base.QueueName = "queue_test";
        }

        public override void Receive(IRabbitmqClient client, DataEventArgs args)
        {
            Messenger.Instance.Send<string>("message", args.Content);
        }
    }
}
